package demo1;

import java.util.*;

public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int ret = 0;
        String str = in.nextLine();
        int i = 0, n = str.length();
        String s ="";
        while(i<n) {
            int j = i;
            while(j<n && str.charAt(j) >='0' && str.charAt(j) <= '9') {
                j++;
            }
            if(ret < j-i) {
                ret = j-i;
                s = str.substring(i,j);
                i = j;
            }else {
                i++;
            }
        }
        //System.out.println(ret);
        System.out.println(s);
    }
}